package com.cc.controller;

import com.cc.entity.Cart;
import com.cc.service.CartService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @program:
 * @ClassName:
 * @description:
 * @author: zgc
 * @date:
 * @Version 1.0
 **/
@RestController
public class CartController {
    @Resource
    private CartService cartService;

    @RequestMapping("/selectCart")
    public List<Cart> selectCart( Integer userId){
        List<Cart> cartList = cartService.selectCart(userId);
        return cartList;
    }
}

